<x:switch>
 <x:case id="case-start">

  <%if @transition.output_form %>
   <x:group>
       <%=@transition.output_form %>
   </x:group>
  <%else %>
    <% if @transition.active? %>
     <x:trigger style="display:block" id="submit-trigger">
         <x:label>Send</x:label>
         <x:action ev:event="DOMActivate">
             <x:send submission="form1"/>
       <!--<x:load resource="javascript:reloadParentFrame()" /> -->
         </x:action>
     </x:trigger>
    <% end %>
  <%end %>
   <!-- <x:textarea ref="output"></x:textarea> -->

 </x:case>
 <x:case id="case-busy">
   <%=image_tag("ajax-loader.gif", :alt => "Sending")%>
 </x:case>
 <x:case id="case-submit-error">
  <%=image_tag("famfamfam/exclamation.png", :alt => "Error")%>
 </x:case>
 <x:case id="case-done">
   <%=image_tag("famfamfam/accept.png", :alt => "OK")%>Submitted!
 </x:case>
</x:switch>